<div class="layui-form-item">
	<label class="layui-form-label" id="label_columnName">文章标题</label>
	<div class="layui-input-block">
		<input type="text" name="title"  required lay-verify="required" autocomplete="off" placeholder="限制30字以内" class="layui-input" value="{news.title}">
	</div>
</div>


<!-- 如果是图文列表页面，图片才会在列表显示。由JS控制其显示 -->
<div class="layui-form-item" id="titlepic" style="display:none;">
	<label class="layui-form-label" id="label_columnName">标题图片</label>
	<div class="layui-input-block">
		<input name="titlepic" id="titlePicInput" type="text" autocomplete="off" placeholder="点击右侧添加" class="layui-input" value="{titlepicImage}" style="padding-right: 120px;">
		<button type="button" class="layui-btn" id="uploadImagesButton" style="float: right;margin-top: -38px;">
			<i class="layui-icon layui-icon-upload"></i>
		</button>
		<a href="{titlepicImage}" id="titlePicA" style="float: right;margin-top: -38px;margin-right: 60px;" title="预览原始图片" target="_black">
			<img id="titlePicImg" src="{titlepicImage}?x-oss-process=image/resize,h_38" onerror="this.style.display='none';" style="height: 36px;max-width: 57px; padding-top: 1px;" alt="预览原始图片">
		</a><input class="layui-upload-file" type="file" name="fileName">
	</div>
</div>


<!-- 
	<div class="layui-form-item">
		<label class="layui-form-label" id="label_columnName">内容简介</label>
		<div class="layui-input-block">
			<textarea class="layui-input" name="intro" style="height:70px;">{news.intro}</textarea>
		</div>
	</div>
 -->

<!-- 配置文件 -->
<script type="text/javascript" src="../module/ueditor/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="../module/ueditor/ueditor.all.js"></script>
<div class="layui-form-item">
	<label class="layui-form-label" id="sucai">
		内容正文
		<div style="padding-top:50px; cursor: pointer; text-align: center;" onclick="openSuCai();" id="useSuCai">
			<span style="font-size:19px; cursor: pointer; opacity: 0.8;">
				<span>加</span><br/>
				<span>载</span><br/>
				<span>模</span><br/>
				<span>版</span><br/>
				<span>库</span>
			</span>
		</div>
	</label>
	<div class="layui-input-block" id="ueditorUpperDiv" style="border: 0px;">
		<textarea class="layui-input" id="myEditor" name="text" style="height: auto; padding-left: 0px; border: 0px;">{text}</textarea>
	</div>
</div>

<script>
	if({siteColumn.type} == 2){
		//类型为2，是图文栏目时，才会显示标题图编辑功能
		document.getElementById('titlepic').style.display='';
	}
</script>

    
<!-- 实例化编辑器 -->
<script type="text/javascript">
var ueditorText = document.getElementById('myEditor').innerHTML;
var ue = UE.getEditor('myEditor',{
	autoHeightEnabled: true,
	autoFloatEnabled: true,
	initialFrameHeight:460  
});
//对编辑器的操作最好在编辑器ready之后再做
ue.ready(function() {
	document.getElementById("myEditor").style.height='auto';
});

//打开素材区域
function openSuCai(){
	//加载素材库可能要等待个一两秒
	document.getElementById('sucai').innerHTML='<span style="font-size:26px; padding-top:20px;">模版库素材库加载中...<span>';
	//加载素材支持库
	loadSuCai();
	//调节素材库跟输入区域的样式
	document.getElementById("ueditorUpperDiv").style.marginLeft='405px';
	document.getElementById("sucai").style.width='370px';
}
</script>